//
//  LHPhotoCollectionCell.m
//  WXYView
//
//  Created by lehuo on 2017/1/11.
//  Copyright © 2017年 lehuo. All rights reserved.
//

#import "LHPhotoCollectionCell.h"
#import "PhotoAssetModel.h"
@interface LHPhotoCollectionCell()
@property (weak, nonatomic) IBOutlet UIButton *tagBtn;
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property(nonatomic,strong)PhotoAssetModel *assetModel;
@end
@implementation LHPhotoCollectionCell

- (void)setCellValue:(id)model
{
    self.assetModel = model;
    self.tagBtn.selected = self.assetModel.isSelect;
    self.imgView.image = [UIImage imageWithCGImage:[self.assetModel.asset thumbnail]];
}

- (IBAction)selectClick:(UIButton *)sender
{
    sender.selected = ! sender.selected;
    self.assetModel.isSelect = sender.selected;
    NSLog(@"%d",sender.selected);
}

@end
